<template>
  <div>
    <div class="top">
      <van-icon name="arrow-left" @click="returnTap" />
      <span>基盘客户</span>
      <van-icon name="ellipsis" @click="nextTap" />
    </div>
    <div class="input">
      <van-icon v-if="search == ''" class="input_icon" name="search" />
      <input type="text" class="inputAl" v-model="search" placeholder="搜索" />
    </div>
    <div class="mouey">
      <div class="mouey1" v-for="item of 10">{{ item }}</div>
    </div>
    <div class="list" v-for="item of 3">
      <div class="row">
        <span>初创:2020/8/1</span>
        <div class="row1">战败</div>
        <span>回访:2020/8/7</span>
      </div>
      <div class="lis" >
        <img src="../../../assets/images/logo.png" alt="" />
        <div class="lis1">
          <span>崔总</span>
          <span>电话 123456887899</span>
        </div>
        <div class="huifang">
回放
        </div>
      </div>
      <div class="text">明天要见的客户...</div>
    </div>
    <van-overlay
      :show="show"
      @click="show = false"
      style="background: rgba(30, 30, 30, 0.5)"
    >
      <div class="wrapper" @click.stop v-if="!jihuo">
        <div class="block">
          <div class="blockOne" @click="addtap">创建新客户</div>
          <div class="blockOne block1" @click="allovertap">
            关闭所有客户提醒
          </div>
          <div class="blockOne" @click="show = false">取消</div>
        </div>
      </div>
      <div class="wrapper" @click.stop v-if="jihuo">
        <div class="blockA">
          <div class="blockOne block1" @click="jihuotap">激活所有客户提醒</div>
          <div class="blockOne" @click="show = false">取消</div>
        </div>
      </div>
    </van-overlay>
  </div>
</template>
<script>
import { Dialog } from "vant";
import Return from "../../../components/return";
export default {
  components: {
    Return,
  },
  data() {
    return {
      search: "",
      show: false,
      jihuo: false,
    };
  },
  methods: {
    returnTap() {
      this.$router.go(-1);
    },
    nextTap() {
      this.show = true;
    },
    addtap() {
      this.$router.push("/jipanadd");
    },

    allovertap() {
      this.show = false;
      Dialog.confirm({
        title: "提示",
        confirmButtonText: "删除",
        confirmButtonColor: "red",
        message:
          "关闭所有客户提醒,在今日回访你将接收不到提醒,并且你当前所有的客户信息将会冻结,要想提醒除非重新激活基盘客户。",
      })
        .then(() => {
          this.jihuo = true;
        })
        .catch(() => {
          // on cancel
        });
    },
    jihuotap() {
      this.$router.push("/chongzhi");
    },
  },
};
</script>
<style scoped>
.top {
  height: 60px;
  width: 90%;
  padding: 0 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  line-height: 60px;
  position: relative;
  background: #eeeeee;
}
.time {
  margin: 20px 10%;
  width: 80%;
  height: 40px;
  background: red;
  line-height: 40px;
  text-align: center;
  border-radius: 5px;
}
.mouey {
  margin: 5px 5%;
  width: 90%;
  height: 40px;
  background: #16A5B6;
  text-align: center;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}
.mouey1 {
  width: 8.8%;
  border-left: 1px solid #fff;
  height: 40px;
  line-height: 40px;
}
.row {
  margin: 10px 10%;
  width: 80%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.row span {
  color: #cccccc;
}
.row1 {
  padding: 5px 15px;
  background: #eee;
  color: #999;
  border-radius: 5px;
}
.huifang{
  background: #16A5B6;
  color: #fff;
  width: 50px;
  height: 30px;
  line-height: 30px;
  text-align: center;
  border-radius: 5px;
  margin-left: 10px;
}
.lis {
  margin: 10px 10%;
  height: 80px;
  width: 80%;
  display: flex;
  align-items: center;
}
.lis img {
  width: 60px;
}
.lis1 {
  display: flex;
  flex-direction: column;
  margin-left: 10px;
  font-weight: bold;
}
.text {
  height: 35px;
  width: 100%;
  line-height: 35px;
  text-align: center;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}
.input {
  height: 50px;
  width: 100%;
  text-align: center;
  line-height: 50px;
  position: relative;
  background: #eeeeee;
}
.input_icon {
  position: absolute;
  left: 43%;
  top: 15px;
  font-size: 18px;
}
.inputAl::-webkit-input-placeholder {
  padding-left: 5%;
}
.inputAl {
  height: 35px;
  width: 96%;
  border: none;
  text-align: center;
}
.block {
  height: 215px;
  width: 100%;
  position: fixed;
  right: 0px;
  bottom: 0px;
  z-index: 100;
  background: rgba(255, 255, 255, 1);
  border-radius: 5px;
  z-index: 999;
}
.blockA {
  height: 145px;
  width: 100%;
  position: fixed;
  right: 0px;
  bottom: 0px;
  z-index: 100;
  background: rgba(255, 255, 255, 1);
  border-radius: 5px;
  z-index: 999;
}
.blockOne {
  height: 68px;
  width: 100%;
  text-align: center;
  line-height: 68px;
}
.block1 {
  border-bottom: 1px solid #bebebe;
  color: red;
}
</style>